Integrand size = 25, antiderivative size = 203 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=\frac {1}{8} \left (48 b c d+36 \left (2 c^2+d^2\right )+b^2 \left (4 c^2+3 d^2\right )\right ) x-\frac {\left (72 b c d+8 b^3 c d-27 d^2+12 b^2 \left (3 c^2+2 d^2\right )\right ) \cos (e+f x)}{6 b f}-\frac {\left (6 (8 b c-3 d) d+3 b^2 \left (4 c^2+3 d^2\right )\right ) \cos (e+f x) \sin (e+f x)}{24 f}-\frac {(8 b c-3 d) d \cos (e+f x) (3+b \sin (e+f x))^2}{12 b f}-\frac {d^2 \cos (e+f x) (3+b \sin (e+f x))^3}{4 b f} \]
1/8*(16*a*b*c*d+4*a^2*(2*c^2+d^2)+b^2*(4*c^2+3*d^2))*x-1/6*(8*a^2*b*c*d+8* b^3*c*d-a^3*d^2+4*a*b^2*(3*c^2+2*d^2))*cos(f*x+e)/b/f-1/24*(2*a*d*(-a*d+8* b*c)+3*b^2*(4*c^2+3*d^2))*cos(f*x+e)*sin(f*x+e)/f-1/12*d*(-a*d+8*b*c)*cos( f*x+e)*(a+b*sin(f*x+e))^2/b/f-1/4*d^2*cos(f*x+e)*(a+b*sin(f*x+e))^3/b/f
Time = 2.14 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.64 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=\frac {12 \left (4 \left (18+b^2\right ) c^2+48 b c d+3 \left (12+b^2\right ) d^2\right ) (e+f x)-144 (b c+3 d) (4 c+b d) \cos (e+f x)+16 b d (b c+3 d) \cos (3 (e+f x))-24 \left (12 b c d+9 d^2+b^2 \left (c^2+d^2\right )\right ) \sin (2 (e+f x))+3 b^2 d^2 \sin (4 (e+f x))}{96 f} \]
(12*(4*(18 + b^2)*c^2 + 48*b*c*d + 3*(12 + b^2)*d^2)*(e + f*x) - 144*(b*c + 3*d)*(4*c + b*d)*Cos[e + f*x] + 16*b*d*(b*c + 3*d)*Cos[3*(e + f*x)] - 24 *(12*b*c*d + 9*d^2 + b^2*(c^2 + d^2))*Sin[2*(e + f*x)] + 3*b^2*d^2*Sin[4*( e + f*x)])/(96*f)
Time = 0.62 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3042, 3270, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^2dx\) |
\(\Big \downarrow \) 3270 |
\(\displaystyle \frac {\int (a+b \sin (e+f x))^2 \left (b \left (4 c^2+3 d^2\right )+d (8 b c-a d) \sin (e+f x)\right )dx}{4 b}-\frac {d^2 \cos (e+f x) (a+b \sin (e+f x))^3}{4 b f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (a+b \sin (e+f x))^2 \left (b \left (4 c^2+3 d^2\right )+d (8 b c-a d) \sin (e+f x)\right )dx}{4 b}-\frac {d^2 \cos (e+f x) (a+b \sin (e+f x))^3}{4 b f}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{3} \int (a+b \sin (e+f x)) \left (b \left (12 a c^2+16 b d c+7 a d^2\right )+\left (3 \left (4 c^2+3 d^2\right ) b^2+2 a d (8 b c-a d)\right ) \sin (e+f x)\right )dx-\frac {d (8 b c-a d) \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}}{4 b}-\frac {d^2 \cos (e+f x) (a+b \sin (e+f x))^3}{4 b f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \int (a+b \sin (e+f x)) \left (b \left (12 a c^2+16 b d c+7 a d^2\right )+\left (3 \left (4 c^2+3 d^2\right ) b^2+2 a d (8 b c-a d)\right ) \sin (e+f x)\right )dx-\frac {d (8 b c-a d) \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}}{4 b}-\frac {d^2 \cos (e+f x) (a+b \sin (e+f x))^3}{4 b f}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {3}{2} b x \left (4 a^2 \left (2 c^2+d^2\right )+16 a b c d+b^2 \left (4 c^2+3 d^2\right )\right )-\frac {2 \left (a^3 \left (-d^2\right )+8 a^2 b c d+4 a b^2 \left (3 c^2+2 d^2\right )+8 b^3 c d\right ) \cos (e+f x)}{f}-\frac {b \left (2 a d (8 b c-a d)+3 b^2 \left (4 c^2+3 d^2\right )\right ) \sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {d (8 b c-a d) \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}}{4 b}-\frac {d^2 \cos (e+f x) (a+b \sin (e+f x))^3}{4 b f}\) |
-1/4*(d^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^3)/(b*f) + (-1/3*(d*(8*b*c - a *d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^2)/f + ((3*b*(16*a*b*c*d + 4*a^2*(2* c^2 + d^2) + b^2*(4*c^2 + 3*d^2))*x)/2 - (2*(8*a^2*b*c*d + 8*b^3*c*d - a^3 *d^2 + 4*a*b^2*(3*c^2 + 2*d^2))*Cos[e + f*x])/f - (b*(2*a*d*(8*b*c - a*d) + 3*b^2*(4*c^2 + 3*d^2))*Cos[e + f*x]*Sin[e + f*x])/(2*f))/3)/(4*b)
3.7.79.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[(-d^2)*Cos[e + f*x]*((a + b*Sin[e + f*x]) ^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x]) ^m*Simp[b*(d^2*(m + 1) + c^2*(m + 2)) - d*(a*d - 2*b*c*(m + 2))*Sin[e + f*x ], x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && Ne Q[a^2 - b^2, 0] && !LtQ[m, -1]
Time = 2.46 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.80
method | result | size |
parts | \(a^{2} c^{2} x -\frac {\left (2 a b \,d^{2}+2 b^{2} c d \right ) \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3 f}-\frac {\left (2 a^{2} c d +2 a b \,c^{2}\right ) \cos \left (f x +e \right )}{f}+\frac {\left (d^{2} a^{2}+4 a b c d +b^{2} c^{2}\right ) \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {d^{2} b^{2} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(162\) |
parallelrisch | \(\frac {24 \left (\left (-c^{2}-d^{2}\right ) b^{2}-4 a b c d -d^{2} a^{2}\right ) \sin \left (2 f x +2 e \right )+16 \left (a b \,d^{2}+b^{2} c d \right ) \cos \left (3 f x +3 e \right )+3 d^{2} b^{2} \sin \left (4 f x +4 e \right )-192 \left (a c +\frac {3 b d}{4}\right ) \left (d a +c b \right ) \cos \left (f x +e \right )+4 \left (12 c^{2} f x +9 d^{2} f x -32 c d \right ) b^{2}-192 \left (-c d f x +c^{2}+\frac {2}{3} d^{2}\right ) a b +96 \left (c^{2} f x +\frac {1}{2} d^{2} f x -2 c d \right ) a^{2}}{96 f}\) | \(178\) |
derivativedivides | \(\frac {d^{2} b^{2} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a b \,d^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-\frac {2 b^{2} c d \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+d^{2} a^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+4 a b c d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+b^{2} c^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a^{2} c d \cos \left (f x +e \right )-2 a b \,c^{2} \cos \left (f x +e \right )+a^{2} c^{2} \left (f x +e \right )}{f}\) | \(216\) |
default | \(\frac {d^{2} b^{2} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a b \,d^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-\frac {2 b^{2} c d \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+d^{2} a^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+4 a b c d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+b^{2} c^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a^{2} c d \cos \left (f x +e \right )-2 a b \,c^{2} \cos \left (f x +e \right )+a^{2} c^{2} \left (f x +e \right )}{f}\) | \(216\) |
risch | \(a^{2} c^{2} x +\frac {a^{2} d^{2} x}{2}+2 x a b c d +\frac {x \,b^{2} c^{2}}{2}+\frac {3 b^{2} d^{2} x}{8}-\frac {2 \cos \left (f x +e \right ) a^{2} c d}{f}-\frac {2 \cos \left (f x +e \right ) a b \,c^{2}}{f}-\frac {3 \cos \left (f x +e \right ) a b \,d^{2}}{2 f}-\frac {3 \cos \left (f x +e \right ) b^{2} c d}{2 f}+\frac {d^{2} b^{2} \sin \left (4 f x +4 e \right )}{32 f}+\frac {b \,d^{2} \cos \left (3 f x +3 e \right ) a}{6 f}+\frac {b^{2} d \cos \left (3 f x +3 e \right ) c}{6 f}-\frac {\sin \left (2 f x +2 e \right ) d^{2} a^{2}}{4 f}-\frac {\sin \left (2 f x +2 e \right ) a b c d}{f}-\frac {\sin \left (2 f x +2 e \right ) b^{2} c^{2}}{4 f}-\frac {\sin \left (2 f x +2 e \right ) d^{2} b^{2}}{4 f}\) | \(244\) |
norman | \(\frac {\left (a^{2} c^{2}+\frac {1}{2} d^{2} a^{2}+2 a b c d +\frac {1}{2} b^{2} c^{2}+\frac {3}{8} d^{2} b^{2}\right ) x +\left (a^{2} c^{2}+\frac {1}{2} d^{2} a^{2}+2 a b c d +\frac {1}{2} b^{2} c^{2}+\frac {3}{8} d^{2} b^{2}\right ) x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (4 a^{2} c^{2}+2 d^{2} a^{2}+8 a b c d +2 b^{2} c^{2}+\frac {3}{2} d^{2} b^{2}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (4 a^{2} c^{2}+2 d^{2} a^{2}+8 a b c d +2 b^{2} c^{2}+\frac {3}{2} d^{2} b^{2}\right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (6 a^{2} c^{2}+3 d^{2} a^{2}+12 a b c d +3 b^{2} c^{2}+\frac {9}{4} d^{2} b^{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {12 a^{2} c d +12 a b \,c^{2}+8 a b \,d^{2}+8 b^{2} c d}{3 f}-\frac {4 \left (a^{2} c d +a b \,c^{2}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {\left (4 d^{2} a^{2}+16 a b c d +4 b^{2} c^{2}+3 d^{2} b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {\left (4 d^{2} a^{2}+16 a b c d +4 b^{2} c^{2}+3 d^{2} b^{2}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {\left (4 d^{2} a^{2}+16 a b c d +4 b^{2} c^{2}+11 d^{2} b^{2}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {\left (4 d^{2} a^{2}+16 a b c d +4 b^{2} c^{2}+11 d^{2} b^{2}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {2 \left (6 a^{2} c d +6 a b \,c^{2}+4 a b \,d^{2}+4 b^{2} c d \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {4 \left (9 a^{2} c d +9 a b \,c^{2}+8 a b \,d^{2}+8 b^{2} c d \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(604\) |
a^2*c^2*x-1/3*(2*a*b*d^2+2*b^2*c*d)/f*(2+sin(f*x+e)^2)*cos(f*x+e)-(2*a^2*c *d+2*a*b*c^2)/f*cos(f*x+e)+(a^2*d^2+4*a*b*c*d+b^2*c^2)/f*(-1/2*sin(f*x+e)* cos(f*x+e)+1/2*f*x+1/2*e)+d^2*b^2/f*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*co s(f*x+e)+3/8*f*x+3/8*e)
Time = 0.27 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.80 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=\frac {16 \, {\left (b^{2} c d + a b d^{2}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (16 \, a b c d + 4 \, {\left (2 \, a^{2} + b^{2}\right )} c^{2} + {\left (4 \, a^{2} + 3 \, b^{2}\right )} d^{2}\right )} f x - 48 \, {\left (a b c^{2} + a b d^{2} + {\left (a^{2} + b^{2}\right )} c d\right )} \cos \left (f x + e\right ) + 3 \, {\left (2 \, b^{2} d^{2} \cos \left (f x + e\right )^{3} - {\left (4 \, b^{2} c^{2} + 16 \, a b c d + {\left (4 \, a^{2} + 5 \, b^{2}\right )} d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \]
1/24*(16*(b^2*c*d + a*b*d^2)*cos(f*x + e)^3 + 3*(16*a*b*c*d + 4*(2*a^2 + b ^2)*c^2 + (4*a^2 + 3*b^2)*d^2)*f*x - 48*(a*b*c^2 + a*b*d^2 + (a^2 + b^2)*c *d)*cos(f*x + e) + 3*(2*b^2*d^2*cos(f*x + e)^3 - (4*b^2*c^2 + 16*a*b*c*d + (4*a^2 + 5*b^2)*d^2)*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 459 vs. \(2 (202) = 404\).
Time = 0.23 (sec) , antiderivative size = 459, normalized size of antiderivative = 2.26 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=\begin {cases} a^{2} c^{2} x - \frac {2 a^{2} c d \cos {\left (e + f x \right )}}{f} + \frac {a^{2} d^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} d^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {a^{2} d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 a b c^{2} \cos {\left (e + f x \right )}}{f} + 2 a b c d x \sin ^{2}{\left (e + f x \right )} + 2 a b c d x \cos ^{2}{\left (e + f x \right )} - \frac {2 a b c d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a b d^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a b d^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {b^{2} c^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} c^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 b^{2} c d \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 b^{2} c d \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 b^{2} d^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b^{2} d^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b^{2} d^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b^{2} d^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b^{2} d^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right )^{2} \left (c + d \sin {\left (e \right )}\right )^{2} & \text {otherwise} \end {cases} \]
Piecewise((a**2*c**2*x - 2*a**2*c*d*cos(e + f*x)/f + a**2*d**2*x*sin(e + f *x)**2/2 + a**2*d**2*x*cos(e + f*x)**2/2 - a**2*d**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*a*b*c**2*cos(e + f*x)/f + 2*a*b*c*d*x*sin(e + f*x)**2 + 2*a *b*c*d*x*cos(e + f*x)**2 - 2*a*b*c*d*sin(e + f*x)*cos(e + f*x)/f - 2*a*b*d **2*sin(e + f*x)**2*cos(e + f*x)/f - 4*a*b*d**2*cos(e + f*x)**3/(3*f) + b* *2*c**2*x*sin(e + f*x)**2/2 + b**2*c**2*x*cos(e + f*x)**2/2 - b**2*c**2*si n(e + f*x)*cos(e + f*x)/(2*f) - 2*b**2*c*d*sin(e + f*x)**2*cos(e + f*x)/f - 4*b**2*c*d*cos(e + f*x)**3/(3*f) + 3*b**2*d**2*x*sin(e + f*x)**4/8 + 3*b **2*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*b**2*d**2*x*cos(e + f*x)* *4/8 - 5*b**2*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*b**2*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f), Ne(f, 0)), (x*(a + b*sin(e))**2*(c + d*sin(e ))**2, True))
Time = 0.22 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.02 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=\frac {96 \, {\left (f x + e\right )} a^{2} c^{2} + 24 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2} c^{2} + 96 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a b c d + 64 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} b^{2} c d + 24 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} d^{2} + 64 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a b d^{2} + 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2} d^{2} - 192 \, a b c^{2} \cos \left (f x + e\right ) - 192 \, a^{2} c d \cos \left (f x + e\right )}{96 \, f} \]
1/96*(96*(f*x + e)*a^2*c^2 + 24*(2*f*x + 2*e - sin(2*f*x + 2*e))*b^2*c^2 + 96*(2*f*x + 2*e - sin(2*f*x + 2*e))*a*b*c*d + 64*(cos(f*x + e)^3 - 3*cos( f*x + e))*b^2*c*d + 24*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*d^2 + 64*(cos( f*x + e)^3 - 3*cos(f*x + e))*a*b*d^2 + 3*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*b^2*d^2 - 192*a*b*c^2*cos(f*x + e) - 192*a^2*c*d*co s(f*x + e))/f
Time = 0.31 (sec) , antiderivative size = 172, normalized size of antiderivative = 0.85 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=\frac {b^{2} d^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {1}{8} \, {\left (8 \, a^{2} c^{2} + 4 \, b^{2} c^{2} + 16 \, a b c d + 4 \, a^{2} d^{2} + 3 \, b^{2} d^{2}\right )} x + \frac {{\left (b^{2} c d + a b d^{2}\right )} \cos \left (3 \, f x + 3 \, e\right )}{6 \, f} - \frac {{\left (4 \, a b c^{2} + 4 \, a^{2} c d + 3 \, b^{2} c d + 3 \, a b d^{2}\right )} \cos \left (f x + e\right )}{2 \, f} - \frac {{\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2} + b^{2} d^{2}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
1/32*b^2*d^2*sin(4*f*x + 4*e)/f + 1/8*(8*a^2*c^2 + 4*b^2*c^2 + 16*a*b*c*d + 4*a^2*d^2 + 3*b^2*d^2)*x + 1/6*(b^2*c*d + a*b*d^2)*cos(3*f*x + 3*e)/f - 1/2*(4*a*b*c^2 + 4*a^2*c*d + 3*b^2*c*d + 3*a*b*d^2)*cos(f*x + e)/f - 1/4*( b^2*c^2 + 4*a*b*c*d + a^2*d^2 + b^2*d^2)*sin(2*f*x + 2*e)/f
Time = 8.39 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.09 \[ \int (3+b \sin (e+f x))^2 (c+d \sin (e+f x))^2 \, dx=-\frac {6\,a^2\,d^2\,\sin \left (2\,e+2\,f\,x\right )+6\,b^2\,c^2\,\sin \left (2\,e+2\,f\,x\right )+6\,b^2\,d^2\,\sin \left (2\,e+2\,f\,x\right )-\frac {3\,b^2\,d^2\,\sin \left (4\,e+4\,f\,x\right )}{4}+48\,a\,b\,c^2\,\cos \left (e+f\,x\right )+36\,a\,b\,d^2\,\cos \left (e+f\,x\right )+48\,a^2\,c\,d\,\cos \left (e+f\,x\right )+36\,b^2\,c\,d\,\cos \left (e+f\,x\right )-4\,a\,b\,d^2\,\cos \left (3\,e+3\,f\,x\right )-4\,b^2\,c\,d\,\cos \left (3\,e+3\,f\,x\right )-24\,a^2\,c^2\,f\,x-12\,a^2\,d^2\,f\,x-12\,b^2\,c^2\,f\,x-9\,b^2\,d^2\,f\,x+24\,a\,b\,c\,d\,\sin \left (2\,e+2\,f\,x\right )-48\,a\,b\,c\,d\,f\,x}{24\,f} \]
-(6*a^2*d^2*sin(2*e + 2*f*x) + 6*b^2*c^2*sin(2*e + 2*f*x) + 6*b^2*d^2*sin( 2*e + 2*f*x) - (3*b^2*d^2*sin(4*e + 4*f*x))/4 + 48*a*b*c^2*cos(e + f*x) + 36*a*b*d^2*cos(e + f*x) + 48*a^2*c*d*cos(e + f*x) + 36*b^2*c*d*cos(e + f*x ) - 4*a*b*d^2*cos(3*e + 3*f*x) - 4*b^2*c*d*cos(3*e + 3*f*x) - 24*a^2*c^2*f *x - 12*a^2*d^2*f*x - 12*b^2*c^2*f*x - 9*b^2*d^2*f*x + 24*a*b*c*d*sin(2*e + 2*f*x) - 48*a*b*c*d*f*x)/(24*f)